1. Field
The described embodiments relate to techniques for forming network connections for an electronic device. More specifically, the described embodiments relate to a technique for using a service discovery request to find available devices when forming a network connection.
2. Related Art
Electronic devices are ubiquitous in modern life. For example, many people have laptop computers, smart phones, tablet computers, and/or other types of electronic devices they use for checking email, keeping track of friends in social networks, handling business transactions, making phone calls, and performing numerous other tasks. Many of these electronic devices include mechanisms for forming wired or wireless network connections with other devices to enable the electronic device to exchange data with the other devices. For example, these devices can include mechanisms for forming Bluetooth™ network connections (Bluetooth is a trademark of the Bluetooth SIG, Kirkland, Wash.), WiFi peer-to-peer network connections, wired/wireless personal-area-network (PAN) connections, and/or other wired or wireless network connections.
Generally, the formation of network connections between devices involves a number of well-defined operations. For example, to form a Bluetooth™ network connection, a device (device A) first makes an inquiry on an inquiry scan channel to determine if other devices are available for forming a Bluetooth™ network connection (i.e., an ad-hoc Bluetooth™ piconet). This operation involves device A using a radio interface to hop to each frequency in a predetermined set of frequencies. At each frequency, device A sends an inquiry at the frequency, and briefly await a response from any available devices before hopping to a next frequency. If a response is received from another device (device B), the response includes an identifier for the device (e.g., a device name and/or MAC address for device B). Device A can then use the received device identifier to perform a page scan in a separate page scan channel to obtain clock and channel hop sequence information that is used to facilitate subsequent communication with device B. Device A then uses the information obtained during the page scan to form a physical (wireless) link with device B.
After forming a wireless link between the devices, some devices perform service discovery operation to determine if a given service or profile is hosted on the other device. For example, in the above-described Bluetooth™ connection, the physical link formed between devices A and B includes a logical asynchronous connectionless link (ACL) that a service discovery application on device A can use to query device B to determine if a particular service or profile is provided by device B, along with information about how to access that service or profile.
The existing process of forming the network connection (i.e., physical link) and performing the service discovery has been optimized to enable a single “client” device to connect to and query a “server” to determine what services are provided by the server. However, in many modern electronic devices, this technique for service discovery may be inefficient because the devices may need separately configured network connections established in both directions. For example, in a Bluetooth™ system, multiple devices may connect to an ad-hoc piconet wherein no particular device performs the functions typically associated with a server, but where instead each device performs the functions of both a server and a client. For example, for some applications on portable electronic devices (e.g., game applications, file transfer applications, etc.), it is not clear which of the portable electronic devices would be a “server,” and so application designers have created applications where both electronic devices perform some of the functions of a server. In such applications, the formation of the network connection and the service discovery protocol is bi-directional, meaning that each device separately performs the inquiry, paging, link formation, and service discovery operations to form a network connection between the devices. Unfortunately, the duplication of these operations can significantly increase the amount of time required to establish a network connection between the devices.
This problem becomes particularly apparent when the piconet includes three or more devices that must each separately connect to the other devices. In these cases, each device must separately form a connection with each other device, a process that can require a sufficient amount of time to be frustrating for the users of the devices.